%%% various records definitions concerning cell and neighborhood
%% cell info
-define(GROWTH, 20).
-define(TIME, 400).
-record(cell,
  {
    state = pause, % cell state
    position, % cell position on map = {X, Y}
    occupant = none, % cell ocupation - presence of being = pid of being
    nbors, % neighbors info = #nbors
    vegetation =  4000, % amount of vegetation
    gpid % pid of process managing growth of vegetation
  }).
% neighbors info, consists of 6 neigbors
-record(nbors,
  {
    count = 0, % neighbor count
    upper = none, % = #neighbor | none
    upper_left = none,
    lower_left = none,
    lower = none,
    lower_right = none,
    upper_right = none
  }).
% single neighbor info
-record(neighbor,
  {
    npid, % neighbor pid = pid()
    occupation = false % cell ocupation - presence of being = true | false
  }).
% simulation properties
-record(props,
  {
    x = 3, % map width
    y = 3, % map height
    veg = 2, % vegetation initial value
    id = 0, % first free Thing id
    things = [] % list of Things
  }).
-record(worm,
  {
    age = 0,
    id,
    spawn_weight = 6000,
    min_weight = 1000,
    weight = 3000,
    eat_rate = 500,
    speed = 500,
    position,
    cpid
  }).
-record(connector,
  {
    state = stop,
    msgs = [],
    msg_count = 0,
    max_msg = 1,
    host = 'any@hopsiup'
  }).
